import { _decorator, Component, Label, Node } from "cc";
const { ccclass, property } = _decorator;

@ccclass("GameOverUI")
export class GameOverUI extends Component {
  // 最高分
  @property(Label)
  highestScoreLabel: Label = null;

  // 当前分
  @property(Label)
  currentScoreLabel: Label = null;

  showGameOverUI(highestScore: number, currentScore: number) {
    // 显示当前over页面
    this.node.active = true;
    
    // 显示分数
    this.highestScoreLabel.string = highestScore.toString();
    this.currentScoreLabel.string = currentScore.toString();
  }
}
